const color = [
    `background-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%)`,
    `background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%)`,
    `background-image: linear-gradient(to top, #fad0c4 0%, #fad0c4 1%, #ffd1ff 100%)`,
    `background-image: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%)`,
    `background-image: linear-gradient(to right, #ff8177 0%, #ff867a 0%, #ff8c7f 21%, #f99185 52%, #cf556c 78%, #b12a5b 100%)`,
    `background-image: linear-gradient(to top, #ff9a9e 0%, #fecfef 99%, #fecfef 100%)`,
    `background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%)`,
    `background-image: linear-gradient(to top, #fbc2eb 0%, #a6c1ee 100%)`,
    `background-image: linear-gradient(to top, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%)`,
    `background-image: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%)`,
    `background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%)`,
    `background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%)`,
    `background-image: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%)`,
    `background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%)`,
    `background-image: linear-gradient(to right, #43e97b 0%, #38f9d7 100%)`,
    `background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%)`,
    `background-image: linear-gradient(to top, #fddb92 0%, #d1fdff 100%)`,
    `background-image: linear-gradient(to top, #9890e3 0%, #b1f4cf 100%)`,
    `background-image: linear-gradient(to top, #ebc0fd 0%, #d9ded8 100%)`,
    `background-image: linear-gradient(to top, #96fbc4 0%, #f9f586 100%)`,
    `background-image: linear-gradient(to top, #c1dfc4 0%, #deecdd 100%)`,
    `background-image: linear-gradient(to top, #0ba360 0%, #3cba92 100%)`,
    `background-image: linear-gradient(to right, #74ebd5 0%, #9face6 100%)`,
    `background-image: linear-gradient(to top, #9795f0 0%, #fbc8d4 100%)`,
    `background-image: linear-gradient(to top, #ff0844 0%, #ffb199 100%)`,
    `background-image: linear-gradient(to right, #92fe9d 0%, #00c9ff 100%)`,
    `background-image: linear-gradient(to right, #f83600 0%, #f9d423 100%)`
]





function setDomStyle(parentClassName) {
    const children = document.getElementsByClassName(parentClassName)[0].children
    for(let i = 0; i < children.length; i++) {
        children[i].style.cssText = color[getRandomIntInclusive(0,color.length - 1)]
    }
}

function getRandomIntInclusive(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值，含最小值 
}